package de.breitbeil.jbooking.ui.dataview.columns;

import org.springframework.util.comparator.NullSafeComparator;

public class PropertyDataViewColumn extends DataViewColumnImpl {

    public PropertyDataViewColumn(String property) {
        this(property, true, true);
    }
    
    public PropertyDataViewColumn(String property, boolean addFilter, boolean addComparator) {
        super(property);
        
        if(addFilter) {
            setFilterProperties(new String[]{property});
        }
        if(addComparator) {
            setComparator(NullSafeComparator.NULLS_HIGH);
        }
    }
}
